package com.xjoyt.pay.master.controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xjoyt.pay.controllers.AbstractController;
import com.xjoyt.pay.dto.ExecuteResult;
import com.xjoyt.pay.dto.PageParam;
import com.xjoyt.pay.dto.PageResult;
import com.xjoyt.pay.master.interfaces.CompanyChannelContract;
import com.xjoyt.pay.master.params.CompanyChannelPageParam;
import com.xjoyt.pay.master.po.CompanyChannel;
import com.xjoyt.pay.master.services.CompanyChannelService;

@RestController
@RequestMapping("companyChannel")
public class CompanyChannelController extends AbstractController implements CompanyChannelContract {

	@Autowired
	private CompanyChannelService service;

	@Override
	public PageResult<CompanyChannel> loadPage(@RequestBody PageParam<CompanyChannelPageParam> param) {
		return service.loadPage(param);
	}

	@Override
	public ExecuteResult<?> save(@RequestBody CompanyChannel param) {
		return service.save(param);
	}

	@Override
	public ExecuteResult<?> remove(@PathVariable("id") String id) {
		return service.delete(id);
	}

}
